
echo "Finding Device ID..."

DEVICE_ID=`system_profiler SPUSBDataType | sed -n -e '/iPad/,/Serial/p' -e '/iPhone/,/Serial/p' | grep "Serial Number:" | awk -F ": " '{print $2}'`

echo "Launching the app in device from command line...."
#Launch the app from command line
/Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -w ${DEVICE_ID} "/Users/yha03/Documents/OFSApp/BuildApp/OFSApp Copy.app" -e UIASCRIPT /Users/yha03/Documents/MyWorkSpace/sb-ofs-mobile-qa-test/shell/mybootstrap.js
echo "Launch completed...."